<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>putil - ClueLib</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.52 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="putil"></a>putil</h1><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>virtual class putil #(</td><td class="PType  prettyprint " nowrap>type&nbsp;</td><td class="PParameter  prettyprint " nowrap>T</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> int</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p><span class="virtual">virtual</span> Provides a parameterized utility function.</p><h4 class=CHeading>Parameter</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>T</td><td class=CDLDescription><span class="optional">optional</span> The type of function arguments.&nbsp; The default is <b>int</b>.</td></tr></table><h4 class=CHeading>See Also</h4><p><a href="cl_util-svh.html#util" class=LClass id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">util</a></p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#putil" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">putil</a></td><td class=SDescription><span class="virtual">virtual</span> Provides a parameterized utility function.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#putil.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#putil.swap" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">swap</a></td><td class=SDescription><span class="static">static</span> Swaps two objects.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="putil.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="putil.swap"></a>swap</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>static function void swap(</td><td class="PTypePrefix  prettyprint " nowrap>ref&nbsp;</td><td class="PType  prettyprint " nowrap>T&nbsp;</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PTypePrefix  prettyprint " nowrap>ref&nbsp;</td><td class="PType  prettyprint " nowrap>T&nbsp;</td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p><span class="static">static</span> Swaps two objects.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x</td><td class=CDLDescription>An object of type <b>T</b>.</td></tr><tr><td class=CDLEntry>y</td><td class=CDLDescription>Another object of type <b>T</b>.</td></tr></table><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">int x = 0;
int y = 1;
putil#(int)::swap( x, y );
assert( x == 1 );
assert( y == 0 );</pre></blockquote></div></div></div>

</div><!--Content-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>virtual class putil #(</td><td class="PType  prettyprint " nowrap>type&nbsp;</td><td class="PParameter  prettyprint " nowrap>T</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> int</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><span class="virtual">virtual</span> Provides a parameterized utility function.</div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>static function void swap(</td><td class="PTypePrefix  prettyprint " nowrap>ref&nbsp;</td><td class="PType  prettyprint " nowrap>T&nbsp;</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PTypePrefix  prettyprint " nowrap>ref&nbsp;</td><td class="PType  prettyprint " nowrap>T&nbsp;</td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><span class="static">static</span> Swaps two objects.</div></div><div class=CToolTip id="tt3"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">virtual class util</td></tr></table></blockquote><span class="virtual">virtual</span> Provides several utility functions.</div></div><!--END_ND_TOOLTIPS-->

<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>